<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/jsp/business/include/doctype.jsp" %>
<link rel="stylesheet" type="text/css" href="/js/jquery-ui-1.8.14.custom/css/ui-lightness/jquery-ui-1.8.14.custom.css" />

<script type="text/javascript">
function goSubmit() {
	
	if(document.form.nabgi_desc.value==""){
		  alert("납기조정사유를 입력하세요!");
		  document.form.nabgi_desc.focus();
		  return false;
	}
	
	//요청내역 Max 1,000자 체크
	if ( document.form.nabgi_desc.value.length > 1000 )
		{
			alert( "납기조정사유는 1000자로 제한됩니다. 긴 문장은 첨부파일로 첨부해 주시기 바랍니다. \n현재 " + eval(document.form.detail.value.length ) + "자 입니다." );
			document.form.nabgi_desc.focus();
			return false;
		}

	//희망완료일 체크
	if(document.form.nabgi_date.value==""){
	  alert("희망완료일을 선택하세요!");
	  document.form.nabgi_date.focus();
	  return false;
	}
}

$(function() {
	var dates = $('#nabgi_date').datepicker({
		showOn: "button",
		buttonImage: "${requestScope.contextPath}/images/reservation/cal1.gif",
		buttonImageOnly: true,
		numberOfMonths: 1,
		dateFormat: 'yy-mm-dd',
		showMonthAfterYear:true,
		showButtonPanel: true,
		monthNamesShort: ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'],
		dayNamesMin: ['일', '월', '화', '수', '목', '금', '토'],
		onSelect: function(selectedDate) {
			var option = this.id == "startdate" ? "minDate" : "maxDate";
			var instance = $(this).data("datepicker");
			var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
			dates.not(this).datepicker("option", option, date);
		}
	});
});
</script>
</head>
<body>
<div id="wrap">
		<div class="header">
			<h1>SERVICE DESK</h1>
		</div><!-- // header -->
		<div class="content">
			<div class="service">
			<form name="form" action="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskDeadLine.do" method="post" onsubmit="return goSubmit();" >
				<div class="table5">
					<input type="hidden" name="Ref_Num" value="${Ref_Num }">
					<input type="hidden" name="Ref_Type" value="${Ref_Type }">
					<table summary="" cellspacing="0" style="width:100%;">
						<caption>서비스 요청</caption>
						<colgroup>
							<col style="width:20%" />
							<col style="width:80%" />
						</colgroup>
						<tbody>
							<tr>
								<th scope="row">조정사유</th>
								<td>
								&nbsp; 납기일 조정 사유를 입력하여 주십시오.	<br>
								<textarea cols="" rows="3" class="comment" name="nabgi_desc"></textarea></td>
							</tr>
							<tr>
								<th scope="row">처리가능 예정일</th>
								<td><input type="text" name="nabgi_date" class="intxt5"  readonly id="nabgi_date" /></td>
							</tr>
						</tbody>
					</table>
				</div>
				<p class="btn_more"><input type="image" src="${requestScope.contextPath}/images/btn/btn_request.gif" alt="요청" /></a>&nbsp;&nbsp;<img src="${requestScope.contextPath}/images/btn/btn_reset.gif" alt="취소" onclick="history.back(-1);" /></p>
				</form>
			</div>
		</div><!-- // content -->
	</div><!-- // wrap -->
	
</body>
</html>